from django.db import models


# Create your models here.

class Student(models.Model):
    GENDER = (('0', '女性'), ('1', "男性"))
    name = models.CharField(max_length=20, null=False, blank=False)
    age = models.IntegerField(null=True)
    gender = models.CharField(max_length=1, choices=GENDER)  # 可选项
    phone = models.CharField(max_length=11, default='')
    models.IntegerField

class Info(models.Model):
    COMPLETED = (('0', '未完成'), ('1', '完成'))
    WHOLE = (('0', '完整'), ('1', '不完整'))
    name = models.CharField(max_length=20, blank=False)
    completed = models.CharField(max_length=1, choices=COMPLETED)
    whole = models.CharField(max_length=1, choices=WHOLE)

    # 指定数据表的名称
    class Meta:
        db_table = 'info'
